{% macro render_field_with_errors(field) %}
  <p>
    {{ field.label }} {{ field(**kwargs)|safe }}
{{ field|pprint(True) }}xx

    {% if field.errors %}
      <ul>
      {% for error in field.errors %}
        <li>{{ error }}</li>
      {% endfor %}
      </ul>
    {% endif %}
  </p>
{% endmacro %}
{% macro display_field_errors(field) %}
    {% if field.errors %}
	<div class="alert alert-danger" rol="alert">
      {% for error in field.errors %}
		<p>
			<span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span>
			{{ error }}
		</p>
      {% endfor %}
	</div>
    {% endif %}
{% endmacro %}

{% macro render_field(field) %}
  <p>{{ field(**kwargs)|safe }}</p>
{% endmacro %}
